package main

import "github.com/jbrukh/bayesian"

const (
	Good bayesian.Class = "Good"
	Bad  bayesian.Class = "Bad"
)

func main() {
	classifier := bayesian.NewClassifier(Good, Bad)
	goodStuff := []string{"tall", "rich", "handsome"}
	badStuff := []string{"poor", "smelly", "ugly"}
	classifier.Learn(goodStuff, Good)
	classifier.Learn(badStuff, Bad)

	scores, likely, _ := classifier.LogScores(
		[]string{"tall", "girl"},
	)
	println(scores[0], scores[1])
	println(likely)

	probs, likely, _ := classifier.ProbScores(
		[]string{"poor", "rich", "ugly"},
	)
	println(probs[0], probs[1])
	println(likely)
}
